home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / MCASM.RAR / MC_ASM.EXE / WROX_ASM / CH12 / VESA / ACER / VESA_100.TXT next >
Text File  |  1992-11-18  |  9KB  |  238 lines

  1. Path : ~m3139/document/spec/vesa_100.txt
  2. Date : 11/11/1992
  3. Subject : VESA BIOS spec. for ALI-SVGA-M3135
  4. By : Eric Hsu
  5.  
  6. Preface :
  7.   This VESA BIOS follows the standard #VS891001, released on Oct. 1, 1989 by VESA.
  8.   Supported modes include :
  9.     mode 100h       640*400*256
  10.     mode 101h       640*480*256
  11.     mode 102h(6Ah)  800*600*16
  12.     mode 103h       800*600*256
  13.     mode 104h       1024*768*16
  14.     mode 105h       1024*768*256
  15.   All these extended VGA modes can be setup with VESA BIOS calls(AH=4FH, INT10H),
  16.   but output function support(such as write pixel, write character, scroll, etc.)
  17.   is not provided by the VESA BIOS for these modes. 
  18.  
  19. VESA VGA BIOS :
  20.  
  21. Function 00 -- return Super VGA information
  22.                Return the information about the capabilities of the Super VGA.
  23.  
  24. Call INT 10H
  25.      input : AH = 4FH; Super VGA support
  26.          AL = 00H; Function #0, return Super VGA information
  27.          ES:DI = Pointer to a 256 bytes information buffer
  28.      output : AL == 4FH; function is supported
  29.           AL != 4FH; function is not supported
  30.           AH == 00H; function call successful
  31.           AH == 01H; function call failed
  32.           All other registers are preserved
  33.  
  34. The information block has the following structure :
  35.   VgaInfoBlock struc
  36.       VESASignature    db     'VESA'; VESA signature
  37.       VESAVersion      dw     0100H;  version number
  38.       OEMStringPtr     dd     ?; long pointer to product information
  39.       Capabilities     db     4 dup(?); reserved
  40.       VideoModePtr     dd     ?; long pointer to supported mode list
  41.   VgaInfoBlock ends
  42.  
  43. Product information string terminated by NULL character :
  44.   db 'Acer Lab. Incorporated. SVGA-M3135-0001",NULL
  45.  
  46. Supported mode list terminated by 0FFFFH :
  47.   dw 100H,101H,102H,103H,104H,105H,0FFFFH
  48.  
  49. Function 01 -- return Super VGA mode information
  50.                Return the information for a specific mode. The capabilities
  51.            of the desired mode is returned in the user provided 256 byte
  52.            buffer.
  53.  
  54. Call INT 10H
  55.      input : AH = 4FH; Super VGA support
  56.          AL = 01H; Function #1, return Super VGA mode information
  57.          CX = Super VGA mode number
  58.          ES:DI = Pointer to a 256 bytes information buffer
  59.      output : AL == 4FH; function is supported
  60.           AL != 4FH; function is not supported
  61.           AH == 00H; function call successful
  62.           AH == 01H; function call failed
  63.           All other registers are preserved
  64.  
  65. The information block has the following structure :
  66.   ModeInfoBlock struc
  67.   ; mandatory information
  68.       ModeAttributes       dw     ?; mode attributes
  69.       WinAAttributes       db     ?; window A attribues
  70.       WinBAttributes       db     ?; window B attribues
  71.       WinGranularity       dw     ?; window granularity
  72.       WinSize              dw     ?; window size
  73.       WinASegment          dw     ?; window A start segment
  74.       WinBSegment          dw     ?; window B start segment
  75.       WinFuncPtr           dd     ?; pointer to window function
  76.       BytesPerScanLine     dw     ?; bytes per scan line
  77.   ; optional information is not available
  78.   ModeInfoBlock ends
  79.  
  80. For all extended modes :
  81.       ModeAttributes       dw     0019H; extended mode information is
  82.                        ; not available
  83.       WinAAttributes       db     05H; window A is writeable, not readable
  84.       WinBAttributes       db     03H; window B is readable, not writeable
  85.       WinGranularity       dw     64; 64K
  86.       WinSize              dw     64; 64K
  87.       WinASegment          dw     0A000H;
  88.       WinBSegment          dw     0A000H;
  89.       WinFuncPtr           dd     ?;
  90.       BytesPerScanLine     dw     ?; bytes per scan line
  91. BytesPerScanLine :
  92.       mode 100H    dw     640
  93.       mode 101H    dw     640
  94.       mode 102H    dw     100
  95.       mode 103H    dw     800
  96.       mode 104H    dw     128
  97.       mode 105H    dw     1024
  98.  
  99. Function 02 -- set Super VGA mode
  100.                initialize a Super VGA mode
  101.  
  102. Call INT 10H
  103.      input : AH = 4FH; Super VGA support
  104.          AL = 02H; Function #2, set Super VGA mode
  105.          BX = Super VGA mode number(bit 14-0)
  106.           bit 15 == 0, clear video memory
  107.           bit 15 == 1, do not clear video memory
  108.      output : AL == 4FH; function is supported
  109.           AL != 4FH; function is not supported
  110.           AH == 00H; function call successful
  111.           AH == 01H; function call failed
  112.           All other registers are preserved
  113.  
  114. Function 03 -- return current video mode
  115.  
  116. Call INT 10H
  117.      input : AH = 4FH; Super VGA support
  118.          AL = 03H; Function #3, return current video mode
  119.      output : AL == 4FH; function is supported
  120.           AL != 4FH; function is not supported
  121.           AH == 00H; function call successful
  122.           AH == 01H; function call failed
  123.           BX = Current video mode
  124.           All other registers are preserved
  125.  
  126. Function 04.0 -- return save/restore state buffer size
  127.  
  128. Call INT 10H
  129.      input : AH = 4FH; Super VGA support
  130.          AL = 04H; Function #4, save/restore Super VGA video state
  131.          DL = 00H; item #0, return save/restore state buffer size
  132.          CX = requested states
  133.           D0 : set if save/restore video hardware state
  134.           D1 : set if save/restore BIOS data state
  135.           D2 : set if save/restore video DAC state
  136.           D3 : set if save/restore Super VGA state
  137.      output : AL == 4FH; function is supported
  138.           AL != 4FH; function is not supported
  139.           AH == 00H; function call successful
  140.           AH == 01H; function call failed
  141.           BX = Number of 64-byte blocks to hold the state buffer
  142.           All other registers are preserved
  143.  
  144. Function 04.1 -- save video state
  145.  
  146. Call INT 10H
  147.      input : AH = 4FH; Super VGA support
  148.          AL = 04H; Function #4, save/restore Super VGA video state
  149.          DL = 01H; item #1, save video state
  150.          CX = requested states
  151.           D0 : set if save/restore video hardware state
  152.           D1 : set if save/restore BIOS data state
  153.           D2 : set if save/restore video DAC state
  154.           D3 : set if save/restore Super VGA state
  155.      output : AL == 4FH; function is supported
  156.           AL != 4FH; function is not supported
  157.           AH == 00H; function call successful
  158.           AH == 01H; function call failed
  159.           All other registers are preserved
  160.  
  161. Function 04.2 -- restore video state
  162.  
  163. Call INT 10H
  164.      input : AH = 4FH; Super VGA support
  165.          AL = 04H; Function #4, save/restore Super VGA video state
  166.          DL = 02H; item #2, restore video state
  167.          CX = requested states
  168.           D0 : set if save/restore video hardware state
  169.           D1 : set if save/restore BIOS data state
  170.           D2 : set if save/restore video DAC state
  171.           D3 : set if save/restore Super VGA state
  172.      output : AL == 4FH; function is supported
  173.           AL != 4FH; function is not supported
  174.           AH == 00H; function call successful
  175.           AH == 01H; function call failed
  176.           All other registers are preserved
  177.  
  178. The data format used to save video hardware state, BIOS data and DAC state
  179. should be the same as IBM VGA BIOS. Super VGA states include :
  180.   1. Extend 3CE(09H~12H)
  181.   2. Extend 3D4(81H)
  182.        procedure : Out 3D4(FFH), 1(unlock)
  183.            In/Out 3D4(81H)
  184.            Out 3D4(FFH), 0(lock)
  185.   3. Extend RAMDAC
  186.        procedure : 
  187.                    save : IN 3C6
  188.                   IN 3C6
  189.                   IN 3C6
  190.                   IN 3C6
  191.               IN 3C6, result XX
  192.               save result XX
  193.                 restore : IN 3C6
  194.                   IN 3C6
  195.                   IN 3C6
  196.                   IN 3C6
  197.               OUT 3C6, XX
  198.               save result XX
  199.  
  200. Function 05.0 -- CPU video memory window control
  201.  
  202. Call INT 10H
  203.      input : AH = 4FH; Super VGA support
  204.          AL = 05H; Function #5, video memory window control
  205.          BH = 00H; item #0, select video memory window
  206.          BL = window number
  207.           0 : window A
  208.           1 : window B
  209.              DX = Window position in video memory(in window granularity units)
  210.      output : AL == 4FH; function is supported
  211.           AL != 4FH; function is not supported
  212.           AH == 00H; function call successful
  213.           AH == 01H; function call failed
  214.           All other registers are preserved
  215.  
  216. Function 05.1 -- CPU video memory window control
  217.  
  218. Call INT 10H
  219.      input : AH = 4FH; Super VGA support
  220.          AL = 05H; Function #5, video memory window control
  221.          BH = 01H; item #1, return video memory window
  222.          BL = window number
  223.           0 : window A
  224.           1 : window B
  225.      output : AL == 4FH; function is supported
  226.           AL != 4FH; function is not supported
  227.           AH == 00H; function call successful
  228.           AH == 01H; function call failed
  229.               DX == Window position in video memory(in window granularity units)
  230.           All other registers are preserved
  231.  
  232.  
  233. Video memory control is the same as M3135 read/write segment control. Basically,
  234. M3135 is a dual window system. One window for write and the other one for read.
  235. Acording to the parameters set in VESA BIOS function 01H, 
  236.   window A is used for write segment(3CE, 10H)
  237.   window B is used for read segment(3CE,11H)
  238.